import 'package:flutter/material.dart';
import 'package:flutter_datetime_picker/flutter_datetime_picker.dart';

// 设置驾驶证初领证日期
Future dateCertification(context) async {
  DateTime now = new DateTime.now();
  return DatePicker.showDatePicker(context,
      showTitleActions: true,
      minTime: DateTime(1900, 1, 1),
      maxTime: DateTime(now.year, now.month, now.day), onConfirm: (date) {
    return date;
    // print(date.year);
  }, currentTime: DateTime.now(), locale: LocaleType.zh);
}
